package api

import (
	"github.com/gin-gonic/gin"
	"zy10/api/hoddler"
	"zy10/api/middleware"
	"zy10/pkg/jwt"
)

func Router(r *gin.Engine) {
	r.Use(middleware.Get())
	user := r.Group("user")
	{
		user.POST("/login", hoddler.Login)
		user.GET("/list", hoddler.List)
		user.Use(jwt.JWTAuth(hoddler.JWT_TOKEN_USER))
		user.POST("/addFriend", hoddler.AddFriend)
	}
}
